package com.gsoe.problem.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Objects;

/**
 * <p>
 * 已注册考试学生信息表
 * </p>
 *
 * @author xiaoma
 * @since 2024-10-27
 */
@Getter
@Setter
@TableName("exam_register_user")
public class ExamRegisterUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private Long userId;

    private String userName;

    private Long examId;

    /**
     * 分数
     */
    private Integer score;

    /**
     * 教师评语
     */
    private String teacherComment;

    /**
     * AI总结
     */
    private String aiComment;

    /**
     * 状态：1、已经加入 2、已交卷 3、评测中  4、完成 5、失败
     */
    private Integer status;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ExamRegisterUser that = (ExamRegisterUser) o;
        return Objects.equals(userId, that.userId);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(userId);
    }
}
